package com.wsdcd.zlg.sb.util;

public class AjaxObject {
	/**
	 * 1 表示成功 0 表示失败
	 */
	private int result;
	/**
	 * 处理完成后的提示信息
	 */
	private String msg;
	/**
	 * 附加对象
	 */
	private Object object;
	
	public String toJSON(){
		String jsonStr = "{"
				+ "\"result\":\""+result+"\","
				+ "\"msg\":\""+msg+"\","
				+ "\"object\":\""+object+"\""
				+ "}";
		return jsonStr;
	}
	
	public int getResult() {
		return result;
	}
	public void setResult(int result) {
		this.result = result;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	public Object getObject() {
		return object;
	}
	public void setObject(Object object) {
		this.object = object;
	}
	public AjaxObject(int result, String msg, Object object) {
		super();
		this.result = result;
		this.msg = msg;
		this.object = object;
	}
	public AjaxObject(int result, String msg) {
		super();
		this.result = result;
		this.msg = msg;
	}
	public AjaxObject(int result) {
		super();
		this.result = result;
	}
	public AjaxObject() {
		super();
	}
}
